# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=py3-markdown2
pkgver=2.4.13
pkgrel=1
pkgdesc="fast and complete implementation of Markdown in Python"
url="https://github.com/trentm/python-markdown2"
arch="noarch"
license="MIT"
depends="
	python3
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/m/markdown2/markdown2-$pkgver.tar.gz"
builddir="$srcdir/markdown2-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
df015b53a87138b55fb6ab28c5b4cc8b1a36867a9a1b0fab962399c467e9847b249bff6a8ad920d56c4b72a02b46ffc536e61fa3168794403602926e65091748  markdown2-2.4.13.tar.gz
"
